<!-- /ezadm/template/board/ezbb_auth.htm :: 2010-03-04 :: ezdong & hamhaja -->
<script type="text/javascript" src="/js/list_manager.js"></script>
<script type="text/javascript">
//<![CDATA[
$(function() {
	LM = new ListManager('src_group_id', 'dst_group_id');

	//웹표준을 위해 임시로 생성된 select => option 을 제거한다.
	$("#temp_opt").remove();
});

//group 값 정리
function check_form(f)
{
	var groups = '';
	for (var i=0; i<f.elements['dst_group'].length; i++)
	{
		if (i) groups += ',';
		groups += f.elements['dst_group'][i].value;
	}
	f.elements['ebcf_admgrp_list'].value = groups;
	return true;
}
//]]>
</script>

<ul>
	<li class="blue">할당된 관리자그룹의 관리자에게는 게시판의 모든 권한이 부여됩니다.</li>
	<li class="blue">작성자에 한해 수정 및 삭제권한은 자동으로 부여됩니다.</li>
</ul>

<form name="update_form" method="post" action="<?=$_SERVER['PHP_SELF']?>" target="form_receiver" onsubmit="return check_form(this)">
<input type="hidden" name="g_job" value="<?=$g_job?>" />
<input type="hidden" name="g_subjob" value="update" />
<input type="hidden" name="ebcf_id" value="<?=$auth_record['ebcf_id']?>" />
<input type='hidden' name='ebcf_admgrp_list' value="" />

	<!-- 게시판 관리자 설정 ▼▼▼ -->
	<table class="form2" style="width:500px; margin: 0 auto;" align="center">
	<caption>관리자 설정</caption>
	<col width="20%" /><col width="80%" />
	<tr>
		<th>관리자그룹</th>
		<td><table id="form1">
			<col width="40%" /><col width="20%" /><col width="40%" />
			<tr>
				<th style="background-color:#46779B; font-weight: bold;">전체 관리자그룹</th>
				<td></td>
				<th style="background-color:#46779B; font-weight: bold;">할당된 관리자그룹</th>
			</tr>
			<tr>
				<td>
					<select name="src_group" id="src_group_id" class="full" size="7">
						<?php foreach ($member_groups as $v) { ?>
						<?php if (!in_array($v['mg_id'], $auth_record['groups'])) { ?><option value="<?=$v['mg_id']?>"><?=$v['mg_pname']?></option><?php } ?>
						<?php } ?>
					</select>
				</td>
				<td class="center">
					<a href="#" onclick="LM.move(LM.SOURCE);"><img src="<?=$App->_url_admin?>/icon/left_to_right.gif" border="0" alt="오른쪽으로이동" /></a>
					<br /><br />
					<a href="#" onclick="LM.move(LM.TARGET);"><img src="<?=$App->_url_admin?>/icon/right_to_left.gif" border="0" alt="왼쪽으로 이동" /></a>
				</td>
				<td>
					<select name="dst_group" id="dst_group_id" class="full" size="7">
						<option id="temp_opt">--</option>
						<?php foreach ($auth_record['groups'] as $v) {?>
						<option value="<?=$v?>"><?=$member_groups[$v]['mg_pname']?></option>
						<?php } ?>
					</select>
				</td>
			</tr>
		</table></td>
	</tr>
	<tr>
		<th>관리자목록</th>
		<td><input type="text" name="ebcf_admin_list" class="full" value="<?=$auth_record['ebcf_admin_list']?>" /></td>
	</tr>
	</table>
	<!-- 게시판 관리자 설정 ▲▲▲ -->

	<br /><br />

	<!-- 기능별 권한정보 ▼▼▼ -->
	<table class="form2" style="width:500px; margin: 0 auto;">
	<caption>기능별 권한정보</caption>
	<col width="7%" /><col width="13%" /><col width="25%" /><col width="55%" />
	<tr>
		<th rowspan="7">권<br />한</th>
		<th>목록</th>
		<td><?=$Html->full_select_form('ebcf_list_level', $levels, $auth_record['ebcf_list_level'])?></td>
		<td class="desc"><span class="blue">&gt;&gt; 목록페이지 보기가 가능한 기본레벨</span></td>
	</tr>
	<tr>
		<th>상세</th>
		<td><?=$Html->full_select_form('ebcf_view_level', $levels, $auth_record['ebcf_view_level'])?></td>
		<td class="desc"><span class="blue">&gt;&gt; 상세페이지 보기가 가능한 기본레벨</span></td>
	</tr>
	<tr>
		<th>등록</th>
		<td><?=$Html->full_select_form('ebcf_insert_level', $levels, $auth_record['ebcf_insert_level'])?></td>
		<td class="desc"><span class="blue">&gt;&gt; 게시물 등록이 가능한 기본레벨</span></td>
	</tr>
	<tr>
		<th>수정</th>
		<td><?=$Html->full_select_form('ebcf_update_level', $levels, $auth_record['ebcf_update_level'])?></td>
		<td class="desc"><span class="red">&gt;&gt; 모든 게시물을 수정할 수 있는 기본레벨</span></td>
	</tr>
	<tr>
		<th>삭제</th>
		<td><?=$Html->full_select_form('ebcf_delete_level', $levels, $auth_record['ebcf_delete_level'])?></td>
		<td class="desc"><span class="red">&gt;&gt; 모든 게시물을 삭제할 수 있는 기본레벨</span></td>
	</tr>
	<tr>
		<th>답글</th>
		<td><?=$Html->full_select_form('ebcf_answer_level', $levels, $auth_record['ebcf_answer_level'])?></td>
		<td class="desc"><span class="blue">&gt;&gt; 게시물 답글 등록이 가능한 기본레벨</span></td>
	</tr>
	<tr>
		<th>댓글</th>
		<td><?=$Html->full_select_form('ebcf_reply_level', $levels, $auth_record['ebcf_reply_level'])?></td>
		<td class="desc"><span class="blue">&gt;&gt; 게시물 댓글 등록이 가능한 기본레벨</span></td>
	</tr>
	</table>
	<!-- 기능별 권한정보 ▲▲▲// -->

	<div class="util">
		<input type="submit" class="button" value="수정" />
		<input type="reset" class="button" value="초기화" />
		<input type="button" class="button" value="닫기" onclick="self.close();" />
	</div>


</form>